Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(website): APITable component should navigate to anchor less agressively #10534

Merged
merged 3 commits into from
Oct 3, 2024

Conversation

flixyudh
Copy link
Contributor

@flixyudh flixyudh commented Sep 28, 2024

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

While reading at API section I intent to highlighting name of the API to copy, but the row keep moving to top.

This PR add support for user to highlighted text while keeping the table to focus on top when clicked.

Test Plan

preview

Test links

https://deploy-preview-10534--docusaurus-2.netlify.app/docs/api/plugins/@docusaurus/plugin-content-docs#configuration

Related issues/PRs

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Sep 28, 2024
Copy link

github-actions bot commented Sep 28, 2024

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO Report
/ 🟠 69 🟢 98 🟢 96 🟢 100 Report
/docs/installation 🟠 56 🟢 97 🟢 100 🟢 100 Report
/docs/category/getting-started 🟠 73 🟢 100 🟢 100 🟠 86 Report
/blog 🟠 62 🟢 96 🟢 100 🟠 86 Report
/blog/preparing-your-site-for-docusaurus-v3 🔴 47 🟢 92 🟢 100 🟢 100 Report
/blog/tags/release 🟠 63 🟢 96 🟢 100 🟠 86 Report
/blog/tags 🟠 74 🟢 100 🟢 100 🟠 86 Report

Copy link

netlify bot commented Oct 3, 2024

[V2]

Name Link
🔨 Latest commit 3d175b4
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/66fe88a75a9ad6000805d75a
😎 Deploy Preview https://deploy-preview-10534--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@slorber slorber added the pr: internal This PR does not touch production code, or is not meaningful enough to be in the changelog. label Oct 3, 2024
@slorber
Copy link
Collaborator

slorber commented Oct 3, 2024

Thanks

Your solution worked but I enhanced it a bit so that we don't need to maintained a list of whitelisted elements and also allowing users to select text nodes without navigating to the anchor

@slorber slorber changed the title feat(apitable): support for highlight APIs name table fix(website): APITable component should navigate to anchor less agressively Oct 3, 2024
@slorber slorber merged commit 7f6472a into facebook:main Oct 3, 2024
15 checks passed
@flixyudh flixyudh deleted the feat/addSupportHighlight branch October 3, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: internal This PR does not touch production code, or is not meaningful enough to be in the changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants